package site.suimu.service.impl;

import org.springframework.stereotype.Service;
import site.suimu.mapper.TCollectMapper;
import site.suimu.pojo.TCollect;
import site.suimu.service.TCollectService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TCollectServiceImpl implements TCollectService {

    @Resource
    TCollectMapper tCollectMapper;

    public boolean ins(TCollect tCollect) {
        if(tCollectMapper.create(tCollect)>0){
            return true;
        }
        return false;
    }

    public boolean dle(int id) {
        if(tCollectMapper.delete(id)>0){
            return false;
        }
        return false;
    }

    public List<TCollect> sleByUid(int uid) {
        return tCollectMapper.selectByUid(uid);
    }
}
